﻿<basehostview:BaseHostView x:Class="CharacterCreation.Views.CharacterHostView"
    xmlns:views="clr-namespace:CharacterCreation.Views"             
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:basehostview="clr-namespace:CharacterCreation.Views.Contracts"
    xmlns:converters="clr-namespace:CharacterCreation.Converters"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot">

        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="{StaticResource mainForegroundBrush}" />
                <Setter Property="Margin" Value="2" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
            <Style TargetType="TextBox">
                <Setter Property="Margin" Value="2" />
                <Setter Property="IsEnabled" Value="False" />
            </Style>
        </Grid.Resources>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="3*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Border Grid.Column="0" Grid.Row="0" Background="AliceBlue" Margin="2">
            <TextBlock Text="Characters" FontFamily="Georgia" FontSize="18" Foreground="{StaticResource backgroundBrush}" Margin="20,10,20,10" />
        </Border>
        <views:CharacterListView Grid.Column="0" Grid.Row="1" />


        <Border Grid.Column="1" Grid.Row="0" Background="AliceBlue" Margin="2" Visibility="{Binding Character, Converter={StaticResource visibilityConverter}}">
            <TextBlock Text="{Binding Character.Name}" FontFamily="Georgia" FontSize="18" Foreground="{StaticResource backgroundBrush}" Margin="20,10,20,10" />
        </Border>

        <RichTextBox Visibility="{Binding Character, Converter={StaticResource visibilityConverter}}"
                     Grid.Column="1" Grid.Row="1" Margin="2" /> 
        
        <!--<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Column="1" Grid.Row="1" Visibility="{Binding Character, Converter={StaticResource visibilityConverter}}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <views:CharacterView Grid.Column="0" HorizontalAlignment="Stretch" Grid.Row="0" />
                <views:CharacterStatisticsView DataContext="{Binding Character}" DisplayMode="Compact" Grid.Row="1" HorizontalAlignment="Stretch" Foreground="White" IsEnabled="False" />
                <views:CharacterSkillsView HorizontalAlignment="Stretch" Grid.Row="2"/>
                <views:CharacterSpecialsView HorizontalAlignment="Stretch" Grid.Row="3"/>
                <views:CharacterEquipmentView HorizontalAlignment="Stretch" Grid.Row="4"/>
            </Grid>
        </ScrollViewer>-->

        <Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Margin="2"
                Visibility="{Binding Character, Converter={StaticResource visibilityConverter}, ConverterParameter=inverse}">
            <Border.Background>
                <SolidColorBrush Color="AntiqueWhite" Opacity="0.3" />
            </Border.Background>
            <TextBlock Text="Please select a character." HorizontalAlignment="Center" VerticalAlignment="Center" 
                       FontFamily="Georgia" FontSize="26" Foreground="AliceBlue" />
        </Border>
    </Grid>
</basehostview:BaseHostView>
